/*
package com.ruoyi.web.consumer;

import com.ruoyi.datastatistics.service.IGuoXincallDtuBackService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQPushConsumerLifecycleListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Component
@Repository
@Slf4j
@RocketMQMessageListener(topic = "guoxindtunettyTopic", consumerGroup = "guoxindtu",consumeMode = ConsumeMode.ORDERLY)
public class GuoXinDTUConsumer implements RocketMQListener<String> {

    @Resource
    private IGuoXincallDtuBackService guoXincallDtuBackService;
    @Override
    public void onMessage(String message) {
        //log.info("----------------------消费");
        try{
            guoXincallDtuBackService.callBackSubscribe(message);
            //message(message);
        }catch (Exception e){
            log.error("----------------------GuoXinDTUConsumer消费异常"+e.getMessage());
        }
    }

  */
/*  @Override
    public void prepareStart(DefaultMQPushConsumer consumer) {
        // 设置最大重试次数
        consumer.setMaxReconsumeTimes(5);
    }

    @Async
    public void message(String message){
        try{
            guoXincallDtuBackService.callBackSubscribe(message);
        }catch (Exception e){
            log.error("----------------------消费异常"+e.getMessage());
        }
       // System.out.println("在默认线程" + Thread.currentThread().getName() + "执行了");
    }*//*

}


*/
